Preprocess Time Series Data